package testClass;

import java.util.stream.Stream;

public class Test3 {
    public static void main(String[] args) {
        Class<Student> studentClass = Student.class;

        //获取Student类的父类信息
        Class<? super Student> superclass = studentClass.getSuperclass();
        System.out.println(superclass.getName());

        //获取Student类实现的接口信息
        Class<?>[] interfaces = studentClass.getInterfaces();
        Stream.of(interfaces).forEach(t -> System.out.println(t.getName()));
    }
}
